import type { App } from 'vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const files = import.meta.glob('../components/**/*.js', { eager: true })
const install = function (app: App) {
  Object.entries(files).forEach(([key, value]) => {
    const name = Object.keys(value)      
    app.component(name, value[name])
    
  })

  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
}

export default install
